package de.uni.bremen.estudent.lbs.provider;

import android.net.Uri;

/**
 * @author bahlfeld
 * @version 1.0 31.01.2012
 */
public final class EstudentLBSContract {


    public static class Categories implements CategoryColumns {
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.estudent.category";

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.estudent.category";

        public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
                .appendPath(PATH_CATEGORIES).build();

        public static Uri buildCategoryUri(String categoryId) {
            return CONTENT_URI.buildUpon().appendPath(categoryId).build();
        }

    }

    public static class Meals implements MealsColumns {

        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.estudent.meal";

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.estudent.meals";

        public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
                .appendPath(PATH_MEALS).build();

        public static Uri buildMensaUri(String mensaId) {
            return CONTENT_URI.buildUpon().appendPath(mensaId).build();
        }
    }

    public static class Pois implements PoisColumns {
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.estudent.poi";

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.estudent.pois";

        public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon()
                .appendPath(PATH_POIS).build();

        public static Uri buildPoiUro(String poiId) {
            return CONTENT_URI.buildUpon().appendPath(poiId).build();
        }

    }

       interface CategoryColumns {
        String CATEGORY_DESCRIPTION = "category_description";
        String CATEGORY_ICON = "icon";
        String CATEGORY_ID = "_id";
        String CATEGORY_NAME = "category_name";
    }

    interface MealsColumns {
        String MEAL_DESC = "meal_desc";
        String MEAL_EXTRA = "meal_extra";
        String MEAL_ID = "_id";
        String MEAL_NAME = "meal_name";
        String MEAL_PLACE = "meal_place";
        String MEAL_STAFF_PRICE = "meal_staffprice";
        String MEAL_STUDENT_PRICE = "meal_studentprice";
        String MEAL_TYPE = "meal_type";
        String MEAL_WEEK_DAY = "meal_weekDay";
    }

    interface PoisColumns {
        String POI_CATEGORY = "category";
        String POI_DESCRIPTION = "poi_description";
        String POI_ID = "_id";
        String POI_LAT = "lat";
        String POI_LON = "lon";
        String POI_NAME = "poi_name";
        String POI_CONTACT = "poi_contact_information";
        String POI_OPENING_HOURS = "opening_hours";
    }

    public static final String CONTENT_AUTHORITY = "de.uni.bremen.estudent.lbs";
    private static final Uri BASE_CONTENT_URI = Uri.parse("content://"
            + CONTENT_AUTHORITY);

    private static final String PATH_CATEGORIES = "categories";

    private static final String PATH_MEALS = "meals";

    private static final String PATH_POIS = "pois";

}
